/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javax.swingx;

import java.awt.Color;
import java.awt.Font;
import java.util.HashMap;


/**
 *
 * @author stephane
 */
public class CodeEditor extends javax.swing.CodeEditorPane {
    private static final long serialVersionUID = 1L;

    public CodeEditor() {
        HashMap<String,Color> syntax = new HashMap<String,Color>();
        syntax.put("node", Color.BLUE);
        syntax.put("edon", Color.BLUE);
        syntax.put("sub", Color.BLUE);
        syntax.put("state", Color.BLUE);
        syntax.put("flow", Color.BLUE);
        syntax.put("event", Color.BLUE);
        syntax.put("init", Color.BLUE);
        syntax.put("trans", Color.BLUE);
        syntax.put("domain", Color.BLUE);
        syntax.put("const", Color.BLUE);
        syntax.put("assert", Color.BLUE);
        syntax.put("sync", Color.BLUE);
        syntax.put("mode", Color.BLUE);
        syntax.put("if", Color.BLUE);
        syntax.put("then", Color.BLUE);
        syntax.put("else", Color.BLUE);
        syntax.put("ite", Color.BLUE);
        syntax.put("not", Color.BLUE);
        
        
        this.setFont(this.getFont().deriveFont(Font.PLAIN, 10));
        this.setKeywordColor(syntax);
        HashMap<String, String> helpkeyword = new HashMap<String, String>();
        helpkeyword.put("keyword", "texte d'aide");
        this.setKeywordHelp(helpkeyword);
        
        //this.setVerticalLineAtPos(80);
        
    }
}
